package com.ms;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.ComponentScan;

/**
 * 项目启动类
 * 负责扫描Spring组件和MyBatis的Mapper接口
 */
@SpringBootApplication
// 扫描MyBatis的Mapper接口（对应你的dao包）
@MapperScan("com.ms.dao")
// 显式指定组件扫描范围（覆盖所有业务包，确保Spring能扫描到Bean）
@ComponentScan(basePackages = {
        "com.ms.config",
        "com.ms.controller",
        "com.ms.service",
        "com.ms.service.impl",
        "com.ms.interceptor",
        "com.ms.utils"
})
public class MsApplication {
    public static void main(String[] args) {
        SpringApplication.run(MsApplication.class, args);
    }
}
